/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package uimigration.uipositionning.util;

import java.util.List;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;

import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.util.Switch;
import uimigration.uipositionning.*;

/**
 * <!-- begin-user-doc -->
 * The <b>Switch</b> for the model's inheritance hierarchy.
 * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
 * to invoke the <code>caseXXX</code> method for each class of the model,
 * starting with the actual class of the object
 * and proceeding up the inheritance hierarchy
 * until a non-null result is returned,
 * which is the result of the switch.
 * <!-- end-user-doc -->
 * @see uimigration.uipositionning.UipositionningPackage
 * @generated
 */
public class UipositionningSwitch<T> extends Switch<T> {
	/**
	 * The cached model package
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected static UipositionningPackage modelPackage;

	/**
	 * Creates an instance of the switch.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public UipositionningSwitch() {
		if (modelPackage == null) {
			modelPackage = UipositionningPackage.eINSTANCE;
		}
	}

	/**
	 * Checks whether this is a switch for the given package.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @parameter ePackage the package in question.
	 * @return whether this is a switch for the given package.
	 * @generated
	 */
	@Override
	protected boolean isSwitchFor(EPackage ePackage) {
		return ePackage == modelPackage;
	}

	/**
	 * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @return the first non-null result returned by a <code>caseXXX</code> call.
	 * @generated
	 */
	@Override
	protected T doSwitch(int classifierID, EObject theEObject) {
		switch (classifierID) {
			case UipositionningPackage.POSITIONNING: {
				Positionning positionning = (Positionning)theEObject;
				T result = casePositionning(positionning);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case UipositionningPackage.ABSOLUTE: {
				Absolute absolute = (Absolute)theEObject;
				T result = caseAbsolute(absolute);
				if (result == null) result = casePositionning(absolute);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case UipositionningPackage.RELATIVE: {
				Relative relative = (Relative)theEObject;
				T result = caseRelative(relative);
				if (result == null) result = casePositionning(relative);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case UipositionningPackage.LEFT_TO: {
				LeftTo leftTo = (LeftTo)theEObject;
				T result = caseLeftTo(leftTo);
				if (result == null) result = caseRelative(leftTo);
				if (result == null) result = casePositionning(leftTo);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case UipositionningPackage.RIGHT_TO: {
				RightTo rightTo = (RightTo)theEObject;
				T result = caseRightTo(rightTo);
				if (result == null) result = caseRelative(rightTo);
				if (result == null) result = casePositionning(rightTo);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case UipositionningPackage.TOP_TO: {
				TopTo topTo = (TopTo)theEObject;
				T result = caseTopTo(topTo);
				if (result == null) result = caseRelative(topTo);
				if (result == null) result = casePositionning(topTo);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case UipositionningPackage.DOWN_TO: {
				DownTo downTo = (DownTo)theEObject;
				T result = caseDownTo(downTo);
				if (result == null) result = caseRelative(downTo);
				if (result == null) result = casePositionning(downTo);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case UipositionningPackage.ATTACHED_TO: {
				AttachedTo attachedTo = (AttachedTo)theEObject;
				T result = caseAttachedTo(attachedTo);
				if (result == null) result = caseRelative(attachedTo);
				if (result == null) result = casePositionning(attachedTo);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case UipositionningPackage.NESTED_IN: {
				NestedIn nestedIn = (NestedIn)theEObject;
				T result = caseNestedIn(nestedIn);
				if (result == null) result = caseRelative(nestedIn);
				if (result == null) result = casePositionning(nestedIn);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			default: return defaultCase(theEObject);
		}
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Positionning</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Positionning</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T casePositionning(Positionning object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Absolute</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Absolute</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseAbsolute(Absolute object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Relative</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Relative</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseRelative(Relative object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Left To</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Left To</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseLeftTo(LeftTo object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Right To</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Right To</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseRightTo(RightTo object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Top To</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Top To</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseTopTo(TopTo object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Down To</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Down To</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseDownTo(DownTo object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Attached To</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Attached To</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseAttachedTo(AttachedTo object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Nested In</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Nested In</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseNestedIn(NestedIn object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch, but this is the last case anyway.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject)
	 * @generated
	 */
	@Override
	public T defaultCase(EObject object) {
		return null;
	}

} //UipositionningSwitch
